package paytreasure.po;

import java.util.Calendar;
import java.util.Date;

import paytreasure.util.ConstantUtil;


/**
 * 账户详情表
 * @author xhh
 * @date 2017年7月12日 
 *
 */

public class Accountdetail {

	private String billId;			//id
	
    private String icon;           //图标
    
    private String shopName;       //店铺名称
    
    private String money;          //金额
    
    private String tranStatus;        //交易状态
     
    private String payMethod;      //支付方式
    
    private String billDescription;    //商品说明
    
    private String address;        //收货地址
    
    private String information;    //物流信息
    
    private String reward;         //积分奖励
     
    private String account;        //对方账户
    
    private String orders;          //订单号
    
    private String merchantOrder;  //商户订单号
    
    private String telephone;        //充值号码
     
    private String parValue;         //面值
    
    private String trading;        //交易对象
    
    private String date;
    private String time;
    private Date createDate;       //创建日期
    
    private Date createTime;       //创建时间
    
    private String creater;        //创建者
    
    private String remark;         //备注
    
    private int status;            //状态

	public String getBillId() {
		return billId;
	}

	public void setBillId(String billId) {
		this.billId = billId;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getShopName() {
		return shopName;
	}

	public void setShopName(String shopName) {
		this.shopName = shopName;
	}

	public String getMoney() {
		return money;
	}

	public void setMoney(String money) {
		this.money = money;
	}

	public String getTranStatus() {
		return tranStatus;
	}

	public void setTranStatus(String tranStatus) {
		this.tranStatus = tranStatus;
	}

	public String getPayMethod() {
		return payMethod;
	}

	public void setPayMethod(String payMethod) {
		this.payMethod = payMethod;
	}

	public String getBillDescription() {
		return billDescription;
	}

	public void setBillDescription(String billDescription) {
		this.billDescription = billDescription;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getInformation() {
		return information;
	}

	public void setInformation(String information) {
		this.information = information;
	}

	public String getReward() {
		return reward;
	}

	public void setReward(String reward) {
		this.reward = reward;
	}

	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public String getOrders() {
		return orders;
	}

	public void setOrders(String orders) {
		this.orders = orders;
	}

	public String getMerchantOrder() {
		return merchantOrder;
	}

	public void setMerchantOrder(String merchantOrder) {
		this.merchantOrder = merchantOrder;
	}

	

	public String getTelephone() {
		return telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	public String getParValue() {
		return parValue;
	}

	public void setParValue(String parValue) {
		this.parValue = parValue;
	}

	public String getTrading() {
		return trading;
	}

	public void setTrading(String trading) {
		this.trading = trading;
	}

	public Date getCreateDate() {
		return createDate;
	}
	
	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	public String getTime() {
		return time;
	}

	public void setTime(String time) {
		this.time = time;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
		
		Calendar calendar = Calendar.getInstance();
		calendar.setTime(createDate);
        int WeekOfYear = calendar.get(Calendar.DAY_OF_WEEK)-1;
        int hour=calendar.get(Calendar.HOUR_OF_DAY);//小时
        int minute=calendar.get(Calendar.MINUTE);//分
        long time1 = calendar.getTimeInMillis();
        calendar.setTime(new Date());
        long time2 = calendar.getTimeInMillis();          
        long between_days=(time2-time1)/(1000*3600*24);
        
        if(between_days == 1) {
        	this.date = ConstantUtil.days[0];
        }else if(between_days == 2) {
        	this.date = ConstantUtil.days[1];
        }else {
        	this.date = ConstantUtil.week[WeekOfYear];
			//this.date = (calendar.get(Calendar.MONTH)+1) + ":" + calendar.get(Calendar.DAY_OF_MONTH);
        }
		this.time = hour + ":" + minute;
	}
	
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getCreater() {
		return creater;
	}

	public void setCreater(String creater) {
		this.creater = creater;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}



    
    
}